﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace hollow_rhombus
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("请输入行数：");
            int linemunber = int.Parse(Console.ReadLine());
            for (int i = 1; i <= linemunber; i++)
            {
                for (int j = 1; j <= linemunber-i; j++)
                {
                    Console.Write(" ");
                }
                if (i==1)                   
                {
                    Console.WriteLine("*");
                }
                else
                {
                    Console.Write("*");
                    for (int j = 1; j <= 2*i-3; j++)
                    {
                        Console.Write(" ");//中间的空格
                    }
                    Console.WriteLine("*");
                }
            }
            for (int i = linemunber-1; i >= 1; i--)
            {
                for (int j = 1; j <= linemunber-i; j++)
                {
                    Console.Write(" ");
                }
                if (i==1)
                {
                    Console.WriteLine("*");
                }
                else
                {
                    Console.Write("*");
                    for (int j = 1; j <= 2 * i - 3; j++)
                    {
                        Console.Write(" ");//中间的空格
                    }
                    Console.WriteLine("*");
                }
            }
            Console.ReadKey();
        }
    }
}
